import request from '@/utils/request'
/**
 * 闯关列表查询
 * @param {*} data
 */
export function queryRush(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/breakthroughDaily/query',
    method: 'post',
    data
  })
}

/**
 * 闯关列表查询
 * @param {*} data
 */
export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/breakthroughDaily/queryPageBreakthroughStatisticsTask',
    method: 'post',
    data
  })
}

/**
 * 插入任务
 * @param {*} data
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/breakthroughDaily/insertBreakthroughStatisticsTask',
    method: 'post',
    data
  })
}

/**
 * 重新统计
 * @param {*} data
 */
export function again(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/breakthroughDaily/runningAgainBreakthroughStatisticsTask',
    method: 'get',
    params: { id }
  })
}

/**
 * 统计详情
 * @param {*} data
 */
export function queryViewPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/breakthroughDaily/queryPageBreakthroughStatisticsTaskResult',
    method: 'post',
    data
  })
}

/**
 * 删除任务
 * @param {*} data
 */
export function del(ids) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/breakthroughDaily/deletesBreakthroughStatisticsTask',
    method: 'get',
    params: { ids }
  })
}

/**
 * 异步企业部门树
 */
export function getComAndOrgTree(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/orgInfo/queryOrgAndDep',
    method: 'post',
    data
  })
}

/**
 * 导出统计--脱敏
 */
export function exportMask(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/breakthroughDaily/exportBreakthroughStatisticsTaskResultMasking',
    method: 'post',
    responseType: 'blob',
    data
  })
}
/**
 * 导出统计--不脱敏
 */
export function exportNoMask(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/breakthroughDaily/exportBreakthroughStatisticsTaskResultNoMasking',
    method: 'post',
    responseType: 'blob',
    data
  })
}

